import request from "../request";
//请假管理查询
export function searchQjgl(query) {
    return request({
        url: '/attendtheme/attendlist',
        method: 'get',
        data: query
    })
}
//请假详情查询
export function searchQjInfo(query) {
    return request({
        url: '/qjiaDetail/list',
        method: 'get',
        data: query
    })
}
//请假详情新增或修改
export function addOrUpdateQjInfo(data) {
    if (data.id) {
        return updateQjInfo(data)
    }
    return addQjInfo(data)
}

//请假详情新增
export function addQjInfo(data) {
    return request({
        url: '/qjiaDetail',
        method: 'post',
        data: data
    })
}
//请假详情修改
export function updateQjInfo(data) {
    return request({
        url: '/qjiaDetail',
        method: 'put',
        data: data
    })
}